/*
 * Copyright (C) 2015 CK, Inc. All Rights Reserved.
 */

package cn.vansky.auth.dao.impl.role;

import cn.vansky.auth.bo.role.Role;
import cn.vansky.auth.dao.role.RoleDao;
import cn.vansky.auth.dao.role.RoleMapper;
import cn.vansky.auth.dto.role.RoleDto;
import cn.vansky.framework.core.dao.ConfigurableBaseSqlMapDao;
import cn.vansky.framework.core.dao.DaoMapper;
import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * This class was generated by MyBatis Generator.
 * This class corresponds to the database table tb_role
 *
 * @mbggenerated 2015-09-05 14:06:23
 */
@Repository("roleDao")
public class RoleDaoImpl extends ConfigurableBaseSqlMapDao<Role, Integer> implements RoleDao {
    @Autowired
    private RoleMapper roleMapper;

    @Override
    public DaoMapper<Role, Integer> getDaoMapper() {
        return roleMapper;
    }

    @Resource(name = "sqlSessionFactory")
    @Override
    public void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory) {
        setSqlSessionFactoryInternal(sqlSessionFactory);
    }

    @Override
    public List<RoleDto> findPageList(Map<String, Object> params) {
        return roleMapper.findPageList(params);
    }
}